package com.steakliu.sun.serializer.api;

import com.steakliu.sun.constant.SerializerConstant;
import com.steakliu.sun.spi.annotation.SPI;

/**
 * 功能说明： 序列化接口
 * <p>
 * Original @Author: steakliu-刘牌, 2023-01-08  13:06
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@SPI(SerializerConstant.JDK)
public interface SunSerializer {
    /**
     * 序列化
     */
    <T> byte[] serialize(T obj);
    /**
     * 反序列化
     */
    <T> T deserialize(byte[] bytes, Class<T> clazz);
}
